import {createRouter, createWebHashHistory, createWebHistory} from "vue-router";
import HomeView from "../views/HomeView.vue";
import FreeCourse from "../views/FreeCourse.vue";
import LoginView from "../views/LoginView.vue";
import RegisterView from "../views/RegisterView.vue";
import SeckillView from "../views/SeckillView.vue";
import LightCourse from "../views/LightCourse.vue";
import ActualCourse from "../views/ActualCourse.vue";
import CourseDetail from "../views/CourseDetail.vue";
import SearchView from "../views/SearchView.vue";
import PaySuccess from "../views/PaySuccess.vue";

const routes = [
    {
        path: '/',
        name: 'home',
        component: HomeView
    },
    {
        path: '/free-course',
        name: 'free-course',
        component: FreeCourse
    },
    {
        path: '/login',
        name: 'login',
        component: LoginView
    },
    {
        path: '/register',
        name: 'register',
        component: RegisterView
    },
    {
        path: '/seckill',
        name: 'seckill',
        component: SeckillView
    },
    {
        path: '/light-course',
        name: 'light-course',
        component: LightCourse
    },
    {
        path: '/actual-course',
        name: 'actual-course',
        component: ActualCourse
    },
    {
        path: '/actual/detail/:pk',
        name: 'detail',
        component: CourseDetail
    },
    {
        path: '/course/search',
        name: 'search',
        component: SearchView
    },
    {
        path: '/pay/success',
        name: 'pay-success',
        component: PaySuccess
    },


]

const router = createRouter({
    history: createWebHistory(),
    routes,
})

export default router